using ViScript.Core.Exceptions;

namespace ViScript.Core.ParsedSentence
{
    public class UnrecognizedParsedSentence : IParsedSentence
    {
        private readonly ISentence sentence;
        private readonly IParsedSentence[] parsedSentences;

        public UnrecognizedParsedSentence(ISentence sentence, IParsedSentence[] parsedSentences)
        {
            this.sentence = sentence;
            this.parsedSentences = parsedSentences;
        }

        public bool IsValid
        {
            get { return false; }
        }

        public ISentence Sentence
        {
            get { return sentence; }
        }

        public void Execute()
        {
            throw new ViScriptSystemException();
        }

        public void Accept(IParsedSentenceVisitor visitor)
        {
            visitor.VisitUnrecognized(this);
        }
    }
}